// Name:            PureBox
// Description:     Define style for PureBox Plugin
//
// Component:       `am-pureview`
//
// ========================================================================

@am-pureview-z-index: 1100;

.am-pureview {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 1009;
  background: rgba(0, 0, 0, 0.95);
  //display: none;
  overflow: hidden;
  -webkit-transition-property: -webkit-transform;
  -moz-transition-property: -moz-transform;
  -o-transition-property: -o-transform;
  transition-property: transform;
  .translate3d(0, 100%, 0);
  .transition-duration(0.4s);

  &.am-active {
    .translate3d(0, 0, 0);
  }

  ul {
    list-style: none;
    padding: 0;
    width: 100%;
  }
}

.am-pureview-slider {
  overflow: hidden;
  height: 100%;

  li {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    .flexbox();
    .justify-content(center);
    .align-items(center);
    vertical-align: middle;
    .transition(all .3s linear);
    // .translate3d(-100%);
    z-index: 100;
    visibility: hidden;

    &.am-pureview-slide-prev {
      .translate3d(-100%);
      visibility: visible;
      z-index: 109;
    }

    &.am-pureview-slide-next {
      .translate3d(100%);
      visibility: visible;
      z-index: 109;
    }

    &.am-active {
      position: relative;
      z-index: 110;
      .translate3d();
      visibility: visible;
    }
  }

  .pinch-zoom-container {
    width: 100%;
    z-index: @am-pureview-z-index + 1;
  }

  .am-pinch-zoom {
    position: relative;
    width: 100%;
    .flexbox();
    .justify-content(center);
    .align-items(center);
  }

  img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 100%;
  }
}

.am-pureview-direction {
  position: absolute;
  top: 50%;
  width: 100%;
  margin-top: -18px;
  z-index: @am-pureview-z-index + 2;

  .am-touch & {
    display: none;
  }

  li {
    position: absolute;
    width: 36px;
    height: 36px;
  }

  a {
    display: block;
    height: 36px;
    border: none;
    color: #ccc;
    opacity: 0.5;
    cursor: pointer;
    text-align: center;

    z-index: 1010;

    &:before {
      .am-icon-font;
      content: @fa-var-chevron-circle-left;
      line-height: 36px;
      font-size: 24px;
    }

    &:hover {
      opacity: 1;
    }
  }

  .am-pureview-prev {
    left: 15px;
  }

  .am-pureview-next {
    right: 15px;

    a:before {
      content: @fa-var-chevron-circle-right;
    }
  }

}

.am-pureview-bar {
  position: absolute;
  top: 0;
  height: 45px;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.15);
  color: @gray-lighter;
  line-height: 45px;
  padding: 0 10px;
  font-size: 14px;
  .flexbox();

  .am-pureview-title {
    .text-overflow(block);
    margin-left: 6px;
    .flex(1);
  }
}

.am-pureview-actions {
  position: absolute;
  z-index: @am-pureview-z-index + 10;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45px;
  background-color: rgba(0, 0, 0, 0.15);
  a {
    position: absolute;
    left: 10px;
    color: #ccc;
    display: block;
    width: 45px;
    line-height: 45px;
    text-align: center;
    font-size: 20px;

    &:hover {
      color: @white;
    }
  }

  [data-am-toggle="share"] {
    left: auto;
    right: 10px;
  }
}

.am-pureview-bar,
.am-pureview-actions {
  opacity: 0;
  .transition(0.15s);
  z-index: @am-pureview-z-index + 10;

  &.am-active {
    opacity: 1;
  }
}